'use strict';

/**
 * @param {Egg.Application} app - egg application
 */
module.exports = app => {
  const { router, controller } = app;
  router.get('/', controller.inout.index);
  router.post('/login', controller.home.login);
  router.post('/uploadImg', controller.home.uploadImg);
  router.get('/schools', controller.home.getSchool);
  router.post('/setSchool', controller.home.setSchool);
  router.post('/editorSchool', controller.home.editorSchool);
  router.get('/delSchool', controller.home.delSchool);
  router.get('/allSchool', controller.home.allSchool);
  router.get('/peoples', controller.people.getPeople);
  router.post('/setPeople', controller.people.setPeople);
  router.get('/delPeople', controller.people.delPeople);
  router.get('/byNumber', controller.people.byNumber);
  router.get('/homeInOut', controller.inout.homeInOut);
  router.get('/getInOut', controller.inout.getInOut);
  router.post('/setInOut', controller.inout.setInOut);
  router.get('/delInOut', controller.inout.delInOut);
  router.get('/getVisitor', controller.visitor.getVisitor);
  router.post('/editorVisitor', controller.visitor.editorVisitor);
  router.post('/setVisitor', controller.visitor.setVisitor);
  router.get('/delVisitor', controller.visitor.delVisitor);
  router.get('/getDayReport', controller.report.getDayReport);
  router.get('/getYearReport', controller.report.getYearReport);
  router.get('/getRangeCount', controller.report.getRangeCount);
};
